<?php
/**
 * @Notes:【】
 * @User: zwc
 * @Date: 2022-05-14 0:20
 */

namespace App\WsService\Chat;

use App\Constants\ChatEvent;
use App\Dao\Chat\ChatRecordsDao;
use App\Dao\Chat\ChatSessionDao;

use App\Resource\ChatFriends;
use App\WsService\Message\BaseService;
use Hyperf\Di\Annotation\Inject;

class ChatRecordsService extends BaseService
{

    /**
     * @Inject()
     * @var ChatRecordsDao
     */
    protected $chatRecordsDao;


    public function read($sender_id, $receiver_id)
    {

        $this->chatRecordsDao
            ->where('user_id', $sender_id)
            ->where('receiver_id', $receiver_id)
            ->update(['is_read' => 1]);
        _GetLastSql();
    }


}